
package guoan.core.dto;

public class DataGridModel implements java.io.Serializable {

    /**
	 * 
	 */
    private static final long serialVersionUID = 1L;
    private int page = 1; // 当前页,名字必须为page
    private int rows = 10; // 每页大小,名字必须为rows
    private String sort; // 排序字段
    private String order; // 排序规则
    private int draw;// dateTables 专用
    private int start;
    private int length;

    public int getPage(){
        return length != 0 ? start / length : page;
    }

    public void setPage(int page){
        this.page = page;
    }

    public int getRows(){
        return length != 0 ? length : rows;
    }

    public void setRows(int rows){
        this.rows = rows;
    }

    public String getSort(){
        return sort;
    }

    public void setSort(String sort){
        this.sort = sort;
    }

    public String getOrder(){
        return order;
    }

    public void setOrder(String order){
        this.order = order;
    }

    public int getDraw(){
        return draw;
    }

    public void setDraw(int draw){
        this.draw = draw;
    }

    public int getStart(){
        return start;
    }

    public void setStart(int start){
        this.start = start;
    }

    public int getLength(){
        return length;
    }

    public void setLength(int length){
        this.length = length;
    }

}
